package collection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

public class list2 {

    public static void main(String[] args) {
        ArrayList<String> list1 = new ArrayList<>(Arrays.asList("a","b","c"));
        list1.replaceAll((s->{
            return s+"edit";
        }));
        System.out.println(list1);
//        System.out.println(list1);

        LinkedList<String> list2 = new LinkedList<>(Arrays.asList("d","a","b","c"));

        System.out.println(list2);
        System.out.println(list2.get(1));
        System.out.println(list2);
//        System.out.println( list2.pop());
//        System.out.println( list2.pop());
//        System.out.println( list2.pop());
////        System.out.println( list2.pop());
//        System.out.println( list2.poll());
            list2.add("eee");
        System.out.println(list2);
//        String remove = list2.remove();
//        System.out.println(remove);
//        System.out.println(list2);
//        System.out.println(list2.poll());
    }
}
